package com.xuelang.pipeline.domain.project.service.impl;

import com.xuelang.pipeline.domain.project.ProjectType;
import com.xuelang.pipeline.domain.project.repository.ProjectTypeRepository;
import com.xuelang.pipeline.domain.project.service.ProjectTypeDomainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>项目类型域服务实现类</p>
 *
 * @author : yixin.lys
 * @date : 2024-09-02 16:17
 **/
@Service
public class ProjectTypeDomainServiceImpl implements ProjectTypeDomainService {

    @Autowired
    private ProjectTypeRepository repository;

    @Override
    public Integer createProjectType(ProjectType projectType) {
        return repository.createProjectType(projectType);
    }

    @Override
    public boolean deleteProjectTypeById(Integer id) {
        return repository.deleteProjectTypeById(id);
    }

    @Override
    public boolean updateProjectType(ProjectType projectType) {
        return repository.updateProjectType(projectType);
    }

    @Override
    public ProjectType findProjectTypeById(Integer id) {
        return repository.findProjectTypeById(id);
    }

    @Override
    public List<ProjectType> findAllProjectTypes() {
        return repository.findAllProjectTypes();
    }

    @Override
    public boolean batchUpdateProjectTypes(List<ProjectType> projectTypeList) {
        return repository.batchUpdateProjectTypes(projectTypeList);
    }
}
